package memo;

import java.math.BigDecimal;

/**
 * @ClassName MementoDemo
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2021/7/23 16:19
 * @Version 1.0
 */
public class MementoDemo {
	public static void main(String[] args) {
		final Bill bill = new Bill(1L, "小王", BigDecimal.ONE);
		final BillSnapshot snapshot = bill.getSnapshot();
		bill.setOther("小明");
		System.out.println(bill.toString());
		bill.restore(snapshot);
		System.out.println(bill.toString());
	}
}
